﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Employee
{
    class Worker : Employee
    {
        private int yearSalary;
        private int salary;

        public Worker(int yearSalary, string name) : base(name)
        { 
        }

        public override void CalculateSalary()
        {
            salary = yearSalary / 12;
            
        }

        public override void PrintToConsole()
        {
            Console.WriteLine("{0} - month salary: ${1}", name, salary);
        }


    }
}
